<!DOCTYPE html>
<!--#
 @version 0.2 (auto-set)
#-->
<html>
<head>
<title><#SETTINGS_SITE_TITLE#> <#LANG_CONTROL_PANEL#></title>
<meta name="keywords" content="">
<meta name="description" content="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
[#if PRINT!="1"#]
<link rel="stylesheet" href="<#ROOTHTML#>bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="<#ROOTHTML#>css/admin.css" type="text/css">
[#else PRINT#]
<link rel="stylesheet" href="<#ROOTHTML#>css/admin_print.css" type="text/css">
[#endif PRINT#]

  <link rel="stylesheet" href="<#ROOTHTML#>css/jquery.autocomplete.css" type="text/css">
  <link rel="stylesheet" href="<#ROOTHTML#>css/jquery.fancybox.css" type="text/css">
  <link rel="stylesheet" href="<#ROOTHTML#>css/jquery.betterTooltip.css" type="text/css">


[#inc scripts.js#]
<script language="javascript" src="/js/scripts.js"></script>
<script language="javascript" src="/js/jquery.js"></script>
<script language="javascript" src="/js/system.js"></script>
<script language="javascript" src="/js/admin.js"></script>

  <script type="text/javascript" src="<#ROOTHTML#>bootstrap/js/bootstrap.min.js"></script>
  <script type="text/javascript" src="<#ROOTHTML#>js/jquery.cookie.js"></script>
  <script type="text/javascript" src="<#ROOTHTML#>js/jquery.fancybox.js"></script>
  <script type="text/javascript" src="<#ROOTHTML#>js/jquery.autocomplete.js"></script>
  <script type="text/javascript" src="<#ROOTHTML#>js/jquery.bgiframe.js"></script>
  <script type="text/javascript" src="<#ROOTHTML#>js/jquery.betterTooltip.js"></script>



</head>

<body>

[#if AUTHORIZED#]

<script language="javascript">

         function showHideLayer(id) {
          var layer=document.getElementById('sub_'+id);
          var layer2=document.getElementById('plus_'+id);
          if (layer.style.display=='none') {
           layer.style.display='block';
           layer2.innerHTML='[-]';
           setCookie('sub_'+id, 'on');
          } else {
           layer.style.display='none';
           layer2.innerHTML='[+]';
           setCookie('sub_'+id, 'off');
          }
          return false;
         }

         function checkLayer(id) {
          var vl=getCookie('sub_'+id);
          if (vl=='off') {
           showHideLayer(id);
          }
         }

 function filterModules() {
  var title=document.frmFilterModules.filter_modules.value;
  var moduleTitle='';
  var sectionTitle='';
  var elem;

  setCookie('panelFilter', title);

  title=title.toLowerCase();

  var found=0;
  var i=0;

  [#begin SUB_MODULES#]

  [#if !DENIED#]
   moduleTitle="[#TITLE#]";
   moduleTitle=moduleTitle.toLowerCase();
   sectionTitle="[#CATEGORY#]";
   sectionTitle=sectionTitle.toLowerCase();
   elem=document.getElementById('module_[#NAME#]_link');
   if (title=='' || moduleTitle.indexOf(title)!=-1 || sectionTitle.indexOf(title)!=-1) {
    elem.style.display='block';
    found++;
   } else {
    elem.style.display='none';
   }
   i++;
  [#endif DENIED#]

  [#if LAST_IN_CATEGORY#]
   //alert('z');
   elem=document.getElementById('row_[#CATEGORY#]');
   if (found>0) {
    elem.style.display='block';
   } else {
    elem.style.display='none';
   }
   //alert(elem.id+': '+elem.style.display);
   found=0;
  [#endif LAST_IN_CATEGORY#]

  [#end SUB_MODULES#]
 }
</script>


[#if PRINT!="1"#]
<!--# top  #-->
<style>
body {
max-width: 1200px;
margin: 0 auto;
}
div#content {
margin: 35px 10px;
padding: 20px 40px;
}
p, .btn, h1 {
margin: 10px 0;
}
.navbar-fixed-top .container, .navbar-fixed-bottom .container {
        width: 1100px;
}
</style>
<div id="content" class="content">
<div class="navbar navbar-fixed-top">
        <div class="navbar-inner">
                <div class="container">
                <a class="brand" href="/"><#SETTINGS_SITE_TITLE#> // <span class="color-white"><#LANG_CONTROL_PANEL#></span></a>
                        <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </a>
                        <div class="nav-collapse">
                                <ul class="nav">
                                        <li>
                                                <a href="<#ROOTHTML#>" target=_blank class=smw><#LANG_FRONTEND#></a>
                                        </li>
                                        <li>
                                                <a href="<#ROOTHTML#>menu.html" target=_blank class=smw><#LANG_CONTROL_MENU#></a>
                                        </li>
                                        <li>
                                                <a href="?action=xray" target=_blank class=smw>X-Ray</a>
                                        </li>
                                        <li>
                                                <a href="<#LANG_WIKI_URL#>" target=_blank  class=smw>MajorDoMo Project</a>
                                        </li>
                                        <li>
                                                <a href="?md=control_access&mode=logoff" class=smw><#LANG_LOGOFF#></a>
                                        </li>
                                </ul>
                        </div>
                </div>
        </div>
</div>

<!--# .top  #-->

<!--/head-->
[#endif PRINT#]
[#if PRINT!="1"#]

<ul class="breadcrumb">
    <li>
    <#LANG_YOU_ARE_HERE#>: <a href="?"><#LANG_CONTROL_PANEL#></a>[#if ACTION!=""#]<span class="divider">/</span>[#endif#]
    </li>
    [#if ACTION!=""#]
        <li class="active"><#ACTION#></li>
        [#endif#]
        
        <div class="float-right">
        <!--# date  #-->
        [#TODAY#]
        <!--# .date  #-->
        <span class="divider">/</span>
        <a href="<#LANG_WIKI_URL#>Main/module_<#ACTION#>" target=_blank><#LANG_MODULE_DESCRIPTION#></a>
        </div>
</ul>

[#endif PRINT#]
<!--main-->
<table id="content">
<tr>
[#if PRINT!="1"#]
<td class="well sidebar-left"><!--left_main-->

<form id="filterModules" class="form-horizontal" name="frmFilterModules"><div class="input-prepend"><span class="add-on"><i class="icon-search"> </i></span><input type="text" name="filter_modules" style="width: 140px" placeholder="<#LANG_FILTER#>"></div></form>

        <!--[menu]-->

<ul class="nav nav-list">
   [#begin SUB_MODULES#]
   [#if NEW_CATEGORY#]
   </ul>
   <ul class="nav nav-list" id="row_[#CATEGORY#]">
   [#if CATEGORY!=""#]
   <li class="nav-header">
   [#CATEGORY#]
   </li>
   [#else CATEGORY#]&nbsp;[#endif CATEGORY#]
   <script language='javascript'>
    checkLayer('[#CATEGORY#]');
   </script>
   [#endif NEW_CATEGORY#]
   [#if !DENIED#]
   [#if SELECTED#]
                <li class="active" id="module_[#NAME#]_link"><a href="?action=[#NAME#]">[#TITLE#]</a></li>
   [#else#]
                <li id="module_[#NAME#]_link"><a href="?action=[#NAME#]">[#TITLE#]</a></li>
   [#endif#]
   [#endif DENIED#]
   [#end SUB_MODULES#]
</ul>

                <!--/left_main--></td>
[#endif PRINT#]
<td height=100% valign=top class="" id="main-content">
<!--right_main-->
<!--# [#if PRINT!="1"#]
        <table cellpadding=10 cellspacing=0 border=0 width=100%><tr>
        <td width=100% bgcolor="#E3E6E9" class=sm>You are here:
        <a href="?">Control Panel</a>
        [#if ACTION!=""#]&raquo; <b><#ACTION#></b>[#endif#]
        </td></tr></table>
[#endif PRINT#] #-->
        <table width=100% height=100%><tr>
        <td width=100% valign=top>

   [#if ACTION!=""#]
    [#module name="<#ACTION#>" action="admin" instance="adm"#]
   [#else ACTION#]
    [#module name="control_access" action="logged" instance="auth"#]
   [#endif ACTION#]


        <!--[/main]-->
        </td></tr></table>

</td></tr>

</table>
 [#else AUTHORIZED#]

 [#module name="control_access" action="enter" instance="auth"#]

 [#endif AUTHORIZED#]
</div>
</body>
</html>
